<?php

Yii::import('zii.widgets.CPortlet');

/**
 * Description of LabShow
 *
 * @author rany
 */
class LabShow extends CPortlet
{
    public $labs;


    public function init()
    {
        $this->labs = Lab::model()->findAll('status=1 order by rand() limit 5');
        Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl. '/js/scroller_roll.js');
        Yii::app()->clientScript->registerScript('carousel',
                "$('#scroller').scroller_roll({
                    title_show: 'disable',//enable  disable
                    time_interval: '40',
                    window_background_color: 'none',
                    window_padding: '1',
                    border_size: '0',
                    border_color: '#0099CC',
                    images_width: '127',
                    images_height: '127',
                    images_margin: '15',
                    title_size: '12',
                    title_color: 'black',
                    show_count: '5'
                });
                " );
        
        parent::init();
    }
    
    public function renderContent()
    {
        $this->render('labShow');
    }
}
